home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0025-Object Pascal Quest-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-06  |  1.2 KB  |  46 lines  |  [TEXT/GEOL]

  1. Item    3770512                         6-Oct-89        02:03
  2.  
  3. From:   D0738                           Kane Biomedical System, S Helm,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Object Pascal Question
  8.  
  9. Attn: MacApp.Tech
  10. SentBy: Kane
  11. Date   10/5/89
  12. Subject    Object Pascal Question
  13. From   Kane
  14. To MacApp.Tech
  15. CC Kane
  16.  
  17.                        Subject:                                Time: 9:48 AM
  18.   OFFICE MEMO          Object Pascal Question                  Date: 10/5/89
  19. I have a general question regarding object Pascal that I can't find addressed
  20. in any of the documentation.  What I want to do is have two objects refer to
  21. one another.  An example would be:
  22.  
  23. TYPE
  24.   TmyObj = OBJECT(TOBJECT)
  25.     x,y: integer;
  26.     z: point
  27.     aList : TList;
  28.     function TmyObj.func1(x1,y1):integer;
  29.     end;
  30.  
  31.   TList = array [0..5] of TmyObj;
  32.  
  33.  
  34. you can see that TmyObj has a TList in it, and TList is an array of TMyObj.
  35. I can of course get around all this by simple delclaring TList as
  36.  
  37.     TList = array [0..5] of TObject;
  38.  
  39. and then checking within any procedure if
  40.  
  41.     Member(aList[i],TmyObj)
  42.  
  43. but this seems like a kludge.  Any help would be appreciated.
  44.                 Jeffrey
  45.  
  46.